home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp95 / scancode.doc < prev    next >
Text File  |  1995-03-31  |  11KB  |  306 lines

  1. Scancode Conversion Tables.
  2.  
  3. Int 09h translates scancodes to ASCII character codes or other
  4. hexadecimal codes as shown in the tables below. The first table
  5. shows scancodes returned when the Char function is OFF.  The
  6. second table shows scancodes returned when the Char function is ON.
  7. For each scancode, the
  8. tables give the equivalent character codes for each keyboard state:
  9. normal, shifted, [Ctrl] active, and [Alt] active.  If a scancode
  10. has an ASCII equivalent, the ASCII character is returned in register AL.
  11. If a converted code of the form
  12. "xxh/00" is shown, a zero value is returned in register AL to indicate
  13. that there is no ASCII value for the key combination.  BIOS Int 16h
  14. returns the value "XXh" in register AH. 
  15.  
  16. Note: 
  17. Some shifted characters on Jaguar are non-shifted on standard IBM keyboards
  18. and some non-shifted characters on Jaguar are shifted on standard
  19. IBM keyboards.  For example,
  20.  
  21.     [(] is non-shifted on Jaguar and shifted on IBM
  22.  
  23.     [Home] is shifted on Jaguar and non-shifted on IBM.
  24.  
  25. On these non-compatible key mappings, Int 0Bh will force 
  26. the status of the shift bits in 40h:17h
  27. to the state used by a compatible keyboard, regardless of
  28. the actual state of the shift keys.  For example:
  29.  
  30.     [(] is reported to Int 09h as a shifted character even though it
  31.         is non-shifted on Jaguar.
  32.  
  33.     [Home] is reported to Int 09h as a non-shifted character even though
  34.         it is shifted on Jaguar.
  35.  
  36. In IBM compatible machines, the [Shift], [Ctrl], and [Alt] keys
  37. affect the interpretation of a scancode with ascending priority.  That
  38. is, the [Alt] key has the highest priority.  If [Alt] is pressed, the
  39. [Shift] and [Ctrl] keys have no affect.  Likewise, if [Ctrl] is pressed,
  40. the [Shift] key has no affect.  The only valid combination involving
  41. both [Ctrl] and [Alt] is the Warm Start sequence [CTRL][ALT][DEL]. 
  42.  
  43. In Jaguar, however, there are some valid combinations of [Shift] and [Ctrl].
  44. In particular:
  45.  
  46.     [Shift][Ctrl][PGUP] yields the compatible keycode for [Ctrl][PGUP]
  47.  
  48.     [Shift][Ctrl][HOME] yields the compatible keycode for [Ctrl][HOME]
  49.  
  50.     [Shift][Ctrl][PGDN] yields the compatible keycode for [Ctrl][PGDN]
  51.  
  52.     [Shift][Ctrl][END] yields the compatible keycode for [Ctrl][END]
  53.  
  54.     [Shift][Ctrl][ [ ] yields the compatible keycode for [Ctrl][ [ ]
  55.  
  56.     [Shift][Ctrl][ ] ] yields the compatible keycode for [Ctrl][ ] ]
  57.  
  58.  
  59. ******************************************************************************
  60.  
  61.         SCANCODE TABLE WHEN CHAR FUNCTION IS OFF
  62.  
  63.                 CHARACTER CODES (hex)
  64. KEY LEGEND    SCANCODE    Normal    Shifted    Control    Alt    Shift+Control
  65. Normal    Shifted    Normal    Shifted    ah/al    ah/al    ah/al    ah/al    ah/al
  66.  
  67. ESC    PrtScr    01    37    01/1B    PrtScr    01/1B
  68. TAB         0F     0F     0F/09     0F/00    94/00    A5/00    94/00
  69. F1        3B    3B    3B/00    54/00    5E/00    68/00    5E/00
  70. F2        3C    3C    3C/00    55/00    5F/00    69/00    5F/00
  71. F3        3D    3D    3D/00    56/00    60/00    6A/00    60/00
  72. F4        3E    3E    3E/00    57/00    61/00    6B/00    61/00
  73. F5        3F    3F    3F/00    58/00    62/00    6C/00    62/00
  74. F6        40    40    40/00    59/00    63/00    6D/00    63/00
  75. F7        41    41    41/00    5A/00    64/00    6E/00    64/00
  76. F8        42    42    42/00    5B/00    65/00    6F/00    65/00
  77. F9        43    43    43/00    5C/00    66/00    70/00    66/00
  78. F10        44    44    44/00    5D/00    67/00    71/00    67/00
  79. upcurs    PGUP    48    49    48/00    49/00    8D/00        84/00
  80. ON/OFF     ON/OFF    70    70            A2/00    
  81. FILER    SETUP    72    71    A8/00    A4/00    AE/00    AB/00    AA/00
  82. COMM    `    73    29    AC/00    29/60    B2/00    AF/00
  83. APPT    ~    74    29    B0/00    29/7E    B6/00    B3/00
  84. PHONE    !    75    02    B4/00    02/21    BA/00    B7/00
  85. MEMO    #    76    04    B8/00    04/23    BE/00    BB/00
  86. 123    $    77    05    BC/00    05/24    C2/00    BF/00
  87. +-*/    &    78    08    C0/00    08/26    C6/00    C3/00
  88. (    |    0A    2B    0A/28    2B/7C        80/00    2B/1C
  89. )    \    0B    2B    0B/29    2B/5C        81/00    2B/1C
  90. <--    <--    0E    0E    0E/08    0E/08    BREAK    0E/00    BREAK    
  91. DEL    INS    53    52    53/00    52/00    93/00        92/00
  92. lfcurs    HOME    4B    47    4B/00    47/00    73/00        77/00
  93. dncurs    PGDN    50    51    50/00    51/00    91/00        76/00
  94. rtcurs    END    4D    4F    4D/00    4F/00    74/00        75/00
  95. Q         10    10    10/71    10/51    10/11    10/00    10/11
  96. W         11    11    11/77    11/57    11/17    11/00    11/17
  97. E         12    12    12/65    12/45    12/05    12/00    12/05
  98. R         13    13    13/72    13/52    13/12    13/00    13/12
  99. T         14    14    14/74    14/54    14/14    14/00    14/14
  100. Y         15    15    15/79    15/59    15/19    15/00    15/19
  101. U        16    16    16/75    16/55    16/15    16/00    16/15
  102. I        17    17    17/69    17/49    17/09    17/00    17/09
  103. O        18    18    18/6F    18/4F    18/0F    18/00    18/0F
  104. P        19    19    19/70    19/50    19/10    19/00    19/10
  105. 7    [    08    1A    08/37    1A/5B            1A/1B
  106. 8    ]    09    1B    09/38    1B/5D            1B/1D
  107. 9    {    0A    1A    0A/39    1A/7B            1A/1B
  108. /    }    35    1B    35/2F    1B/7D            1B/1D
  109.  
  110.  
  111.  
  112.         SCANCODE TABLE WHEN CHAR FUNCTION IS OFF
  113.  
  114.                 CHARACTER CODES (hex)
  115. KEY LEGEND    SCANCODE    Normal    Shifted    Control    Alt    Shift+Control
  116. Normal    Shifted    Normal    Shifted    ah/al    ah/al    ah/al    ah/al    ah/al
  117.  
  118. A        1E    1E    1E/61    1E/41    1E/01    1E/00    1E/01
  119. S        1F    1F    1F/73    1F/53    1F/13    1F/00    1F/13
  120. D        20    20    20/64    20/44    20/04    20/00    20/04
  121. F        21    21    21/66    21/46    21/06    21/00    21/06
  122. G        22    22    22/67    22/47    22/07    22/00    22/07
  123. H        23    23    23/68    23/48    23/08    23/00    23/08
  124. J        24    24    24/6A    24/4A    24/0A    24/00    24/0A
  125. K        25    25    25/6B    25/4B    25/0B    25/00    25/0B
  126. L        26    26    26/6C    26/4C    26/0C    26/00    26/0C
  127. 4    ;    05    27    05/34    27/3B    
  128. 5    :    06    27    06/35    27/3A    
  129. 6    '    07    28    07/36    28/27    07/1E
  130. *    "    37    28    37/2A    28/22    96/00    37/00
  131. CTRL        1D    1D 
  132. Z        2C    2C    2C/7A    2C/5A    2C/1A    2C/00    2C/1A
  133. X        2D    2D    2D/78    2D/58    2D/18    2D/00    2D/18
  134. C        2E    2E    2E/63    2E/43    2E/03    2E/00    2E/03
  135. V        2F    2F    2F/76    2F/56    2F/16    2F/00    2F/16
  136. B        30    30    30/62    30/42    30/02    30/00    30/02
  137. N        31    31    31/6E    31/4E    31/0E    31/00    31/0E
  138. M        32    32    32/6D    32/4D    32/0D    32/00    32/0D
  139. ENTER        1C    1C    1C/0D    1C/0D    1C/0A    1C/00    1C/0A
  140. 1    <    02    33    02/31    33/3C    
  141. 2    >    03    34    03/32    34/3E    03/00
  142. 3    ?    04    35    04/33    35/3F    
  143. -    ^    4A    07    4A/2D    07/5E    8E/00        07/1E
  144. Shift        2A    2A
  145. ALT        38    38
  146. Char        79    79
  147. <space>        39    39    39/20    39/20    39/20    39/20    39/20
  148. ,    ,    33    33    33/2C    33/2C        33/00    
  149. @    @    03    03    03/40    03/40    03/00    79/00    03/00
  150. MENU        7A    7A    C8/00    C9/00    CA/00    CB/00    CA/00
  151. Shift        36    36
  152. 0    CAPS    0B    3A    0B/30
  153. ..    SCRL    34    46    34/2E            34/00    BREAK
  154. =    _    0D    0C    0D/3D    0C/5F        83/00    0C/1F
  155. +    %    4E    06    4E/2B    06/25    90/00    
  156.  
  157.  
  158.         SCANCODE TABLE WHEN CHAR FUNCTION IS ON
  159.  
  160.                 CHARACTER CODES (hex)
  161. KEY LEGEND    SCANCODE    Normal    Shifted    Control    Alt    Shift+Control
  162. Normal    Shifted    Normal    Shifted    ah/al    ah/al    ah/al    ah/al    ah/al
  163.  
  164. ESC    PrtScr    01    37    01/1B    PrtScr    01/1B
  165. TAB         0F     0F     0F/09     0F/00    94/00    A5/00    94/00
  166. F1        3B    3B    DB/00    F4/00    5E/00    68/00    5E/00
  167. F2        3C    3C    DC/00    F5/00    5F/00    69/00    5F/00
  168. F3        3D    3D    DD/00    F6/00    60/00    6A/00    60/00
  169. F4        3E    3E    DE/00    F7/00    61/00    6B/00    61/00
  170. F5        3F    3F    DF/00    F8/00    62/00    6C/00    62/00
  171. F6        40    40    E0/00    F9/00    63/00    6D/00    63/00
  172. F7        41    41    E1/00    FA/00    64/00    6E/00    64/00
  173. F8        42    42    E2/00    FB/00    65/00    6F/00    65/00
  174. F9        43    43    E3/00    FC/00    66/00    70/00    66/00
  175. F10        44    44    E4/00    FD/00    67/00    71/00    67/00
  176. upcurs    PGUP    48    49    48/00    49/00    8D/00        84/00
  177. ON/OFF     ON/OFF    70    70            A2/00    
  178. FILER    SETUP    72    71            AE/00    AB/00    AA/00
  179. COMM    `    73    29    04/EF    29/60    B2/00    AF/00
  180. APPT    ~    74    29    05/F9    29/7E    B6/00    B3/00
  181. PHONE    !    75    02    06/AD    02/AD    BA/00    B7/00
  182. MEMO    #    76    04    07/EE    04/23    BE/00    BB/00
  183. 123    $    77    05    08/B8    05/24    C2/00    BF/00
  184. +-*/    &    78    08    09/A9    08/26    C6/00    C3/00
  185. (    |    0A    2B    0A/DD    2B/7C        80/00    2B/1C
  186. )    \    0B    2B    0B/29    2B/5C        81/00    2B/1C
  187. bkspc    backspc    0E    0E    0E/08    0E/08    BREAK    0E/00    BREAK    
  188. DEL    INS    53    52    53/00    52/00    93/00        92/00
  189. lfcurs    HOME    4B    47    4B/00    47/00    73/00        77/00
  190. dncurs    PGDN    50    51    50/00    51/00    91/00        76/00
  191. rtcurs    END    4D    4F    4D/00    4F/00    74/00        75/00
  192. Q         10    10    10/A6    10/A6    10/11    10/00    10/11
  193. W         11    11    11/A7    11/A7    11/17    11/00    11/17
  194. E         12    12    12/91    12/92    12/05    12/00    12/05
  195. R         13    13    *****    *****    13/12    13/00    13/12
  196. T         14    14    *****    *****    14/14    14/00    14/14
  197. Y         15    15    *****    *****    15/19    15/00    15/19
  198. U        16    16    *****    *****    16/15    16/00    16/15
  199. I        17    17    *****    *****    17/09    17/00    17/09
  200. O        18    18    18/9B    18/9D    18/0F    18/00    18/0F
  201. P        19    19    19/E7    19/E8    19/10    19/00    19/10
  202. 7    [\(dd    08    1A    08/AC    1A/5B            1A/1B
  203. 8    ]\(dd    09    1B    09/AB    1B/5D            1B/1D
  204. 9    {    0A    1A    0A/F3    1A/7B            1A/1B
  205. /    }    35    1B    35/F6    1B/7D            1B/1D
  206.  
  207. ***** Mute function enabled.
  208.  
  209.  
  210.         SCANCODE TABLE WHEN CHAR FUNCTION IS ON
  211.  
  212.                 CHARACTER CODES (hex)
  213. KEY LEGEND    SCANCODE    Normal    Shifted    Control    Alt    Shift+Control
  214. Normal    Shifted    Normal    Shifted    ah/al    ah/al    ah/al    ah/al    ah/al
  215.  
  216. A        1E    1E    1E/86    1E/8F    1E/01    1E/00    1E/01
  217. S        1F    1F    1F/E1    1F/E1    1F/13    1F/00    1F/13
  218. D        20    20    20/D0    20/D1    20/04    20/00    20/04
  219. F        21    21    21/9F    21/9F    21/06    21/00    21/06
  220. G        22    22    22/CF    22/CF    22/07    22/00    22/07
  221. H        23    23    23/BE    23/BE    23/08    23/00    23/08
  222. J        24    24    24/24    24/24    24/0A    24/00    24/0A
  223. K        25    25    25/BD    25/BD    25/0B    25/00    25/0B
  224. L        26    26    26/9C    26/9C    26/0C    26/00    26/0C
  225. 4    ;    05    27    05/34    27/3B    
  226. 5    :    06    27    06/35    27/3A    
  227. 6    '    07    28    07/36    28/27    07/1E
  228. *    "    37    28    37/9E    28/22    96/00    37/00
  229. CTRL        1D    1D 
  230. Z        2C    2C    2C/F4    2C/F4    2C/1A    2C/00    2C/1A
  231. X        2D    2D    2D/F8    2D/F8    2D/18    2D/00    2D/18
  232. C        2E    2E    2E/87    2E/80    2E/03    2E/00    2E/03
  233. V        2F    2F    2F/F5    2F/F5    2F/16    2F/00    2F/16
  234. B        30    30    30/FE    30/FE    30/02    30/00    30/02
  235. N        31    31    31/D5    31/D5    31/0E    31/00    31/0E
  236. M        32    32    32/E6    32/E6    32/0D    32/00    32/0D
  237. ENTER        1C    1C    1C/0D    1C/0D    1C/0A    1C/00    1C/0A
  238. 1    <    02    33    02/AE    33/FB    
  239. 2    >    03    34    03/AF    34/FD    03/00
  240. 3    ?    04    35    04/A8    35/FC    
  241. -    ^    4A    07    4A/F0    07/5E    8E/00        07/1E
  242. Shift        2A    2A
  243. ALT        38    38
  244. Char        79    79
  245. <space>        39    39    39/20    39/20    39/20    39/20    39/20
  246. ,    ,    33    33    33/F7    33/F7        33/00    
  247. @    @    03    03    03/40    03/40    03/00    79/00    03/00
  248. MENU        7A    7A        C9/00    CA/00    CB/00    CA/00
  249. Shift        36    36
  250. 0    CAPS    0B    3A    0B/30
  251. ..    SCRL    34    46    34/FA            34/00    BREAK
  252. =    _    0D    0C    0D/F2    0C/5F        83/00    0C/1F
  253. +    %    4E    06    4E/F1    06/25    90/00    
  254.  
  255.  
  256.             MUTE KEY SEQUENCES
  257.  
  258.         CHARACTER CODES (hex)
  259.         Normal    Shifted    Control    Alt
  260. KEY SEQUENCE    ah/al    ah/al    ah/al    ah/al
  261.  
  262. [Char][r][a]    1E/A0     1E/B5     1E/01     1E/00
  263. [Char][r][e]    12/82    12/90     12/05     12/00
  264. [Char][r][i]    17/A1    17/D6    17/09    17/00
  265. [Char][r][o]    18/A2     18/E0     18/10     18/00
  266. [Char][r][u]    16/A3    16/E9    16/15    16/00
  267. [Char][r][y]    15/EC      15/ED    15/19    15/00
  268. [Char][r][n]    31/6E    31/4E    31/0E    31/00
  269.  
  270. [Char][t][a]    1E/85     1E/B7     1E/01     1E/00
  271. [Char][t][e]    12/8A    12/D4     12/05     12/00
  272. [Char][t][i]    17/8D    17/DE    17/09    17/00
  273. [Char][t][o]    18/95     18/E3     18/10     18/00
  274. [Char][t][u]    16/97    16/EB    16/15    16/00
  275. [Char][t][y]    15/79    15/59    15/19    15/00
  276. [Char][t][n]    31/6E    31/4E    31/0E    31/00
  277.  
  278. [Char][y][a]    1E/83    1E/B6     1E/01     1E/00
  279. [Char][y][e]    12/88     12/D2    12/05     12/00
  280. [Char][y][i]    17/8C    17/D7    1/09    17/00
  281. [Char][y][o]    18/93    18/E2     18/10     18/00
  282. [Char][y][u]    16/96    16/EA    1/15    16/00
  283. [Char][y][y]    15/79    15/59    1/19    15/00
  284. [Char][y][n]    31/6E    31/4E    3/0E    31/00
  285.  
  286. [Char][u][a]    1E/84     1E/8E     1E/01     1E/00
  287. [Char][u][e]    12/89    12/D3     12/05     12/00
  288. [Char][u][i]    17/8B    17/D8    17/09    17/00
  289. [Char][u][o]    18/94     18/99     18/10     18/00
  290. [Char][u][u]    16/81    16/9A    16/15    16/00
  291. [Char][u][y]    15/98    15/59    15/19    15/00
  292. [Char][u][n]    31/6E    31/4E    31/0E    31/00
  293.  
  294. [Char][i][a]    1E/C6     1E/C7     1E/01     1E/00
  295. [Char][i][e]    12/65    12/45     12/05     12/00
  296. [Char][i][i]    17/69    17/49    17/09    17/00
  297. [Char][i][o]    18/E4     18/E5     18/10     18/00
  298. [Char][i][u]    16/75    16/55    16/15    16/00
  299. [Char][i][y]    15/79    15/59    15/19    15/00
  300. [Char][i][n]    31/A4    31/A5    31/0E    31/00
  301. --------------------- end of SCANCODE.DOC -------------------------------------
  302.  
  303. Everett Kaser                   Hewlett-Packard Company
  304. ....hplabs!hp-pcd!everett        work: (503) 750-3569   Corvallis, Oregon
  305. everett%hpcvra@hplabs.hp.com
  306.